Integrand size = 19, antiderivative size = 116 \[ \int (a \sin (c+d x)+b \tan (c+d x))^3 \, dx=-\frac {a \left (a^2-3 b^2\right ) \cos (c+d x)}{d}+\frac {3 a^2 b \cos ^2(c+d x)}{2 d}+\frac {a^3 \cos ^3(c+d x)}{3 d}-\frac {b \left (3 a^2-b^2\right ) \log (\cos (c+d x))}{d}+\frac {3 a b^2 \sec (c+d x)}{d}+\frac {b^3 \sec ^2(c+d x)}{2 d} \]
-a*(a^2-3*b^2)*cos(d*x+c)/d+3/2*a^2*b*cos(d*x+c)^2/d+1/3*a^3*cos(d*x+c)^3/ d-b*(3*a^2-b^2)*ln(cos(d*x+c))/d+3*a*b^2*sec(d*x+c)/d+1/2*b^3*sec(d*x+c)^2 /d
Time = 0.42 (sec) , antiderivative size = 102, normalized size of antiderivative = 0.88 \[ \int (a \sin (c+d x)+b \tan (c+d x))^3 \, dx=\frac {-9 a \left (a^2-4 b^2\right ) \cos (c+d x)+9 a^2 b \cos (2 (c+d x))+a^3 \cos (3 (c+d x))-36 a^2 b \log (\cos (c+d x))+12 b^3 \log (\cos (c+d x))+36 a b^2 \sec (c+d x)+6 b^3 \sec ^2(c+d x)}{12 d} \]
(-9*a*(a^2 - 4*b^2)*Cos[c + d*x] + 9*a^2*b*Cos[2*(c + d*x)] + a^3*Cos[3*(c + d*x)] - 36*a^2*b*Log[Cos[c + d*x]] + 12*b^3*Log[Cos[c + d*x]] + 36*a*b^ 2*Sec[c + d*x] + 6*b^3*Sec[c + d*x]^2)/(12*d)
Time = 0.35 (sec) , antiderivative size = 103, normalized size of antiderivative = 0.89, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.368, Rules used = {3042, 4897, 3042, 25, 3200, 522, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int (a \sin (c+d x)+b \tan (c+d x))^3 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int (a \sin (c+d x)+b \tan (c+d x))^3dx\) |
\(\Big \downarrow \) 4897 |
\(\displaystyle \int \tan ^3(c+d x) (a \cos (c+d x)+b)^3dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int -\frac {\left (b-a \sin \left (c+d x-\frac {\pi }{2}\right )\right )^3}{\tan \left (c+d x-\frac {\pi }{2}\right )^3}dx\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\int \frac {\left (b-a \sin \left (\frac {1}{2} (2 c-\pi )+d x\right )\right )^3}{\tan \left (\frac {1}{2} (2 c-\pi )+d x\right )^3}dx\) |
\(\Big \downarrow \) 3200 |
\(\displaystyle -\frac {\int \frac {(b+a \cos (c+d x))^3 \left (a^2-a^2 \cos ^2(c+d x)\right ) \sec ^3(c+d x)}{a^3}d(a \cos (c+d x))}{d}\) |
\(\Big \downarrow \) 522 |
\(\displaystyle -\frac {\int \left (\frac {b^3 \sec ^3(c+d x)}{a}+3 b^2 \sec ^2(c+d x)+\frac {\left (3 a^2 b-b^3\right ) \sec (c+d x)}{a}-a^2 \cos ^2(c+d x)+a^2 \left (1-\frac {3 b^2}{a^2}\right )-3 a b \cos (c+d x)\right )d(a \cos (c+d x))}{d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {-\frac {1}{3} a^3 \cos ^3(c+d x)+a \left (a^2-3 b^2\right ) \cos (c+d x)+b \left (3 a^2-b^2\right ) \log (a \cos (c+d x))-\frac {3}{2} a^2 b \cos ^2(c+d x)-3 a b^2 \sec (c+d x)-\frac {1}{2} b^3 \sec ^2(c+d x)}{d}\) |
-((a*(a^2 - 3*b^2)*Cos[c + d*x] - (3*a^2*b*Cos[c + d*x]^2)/2 - (a^3*Cos[c + d*x]^3)/3 + b*(3*a^2 - b^2)*Log[a*Cos[c + d*x]] - 3*a*b^2*Sec[c + d*x] - (b^3*Sec[c + d*x]^2)/2)/d)
3.3.46.3.1 Defintions of rubi rules used
Int[((e_.)*(x_))^(m_.)*((c_) + (d_.)*(x_))^(n_.)*((a_) + (b_.)*(x_)^2)^(p_. ), x_Symbol] :> Int[ExpandIntegrand[(e*x)^m*(c + d*x)^n*(a + b*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, m, n}, x] && IGtQ[p, 0]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*tan[(e_.) + (f_.)*(x_)]^(p _.), x_Symbol] :> Simp[1/f Subst[Int[(x^p*(a + x)^m)/(b^2 - x^2)^((p + 1) /2), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x] && NeQ[a^2 - b ^2, 0] && IntegerQ[(p + 1)/2]
Time = 5.01 (sec) , antiderivative size = 116, normalized size of antiderivative = 1.00
method | result | size |
derivativedivides | \(\frac {-\frac {a^{3} \left (2+\sin \left (d x +c \right )^{2}\right ) \cos \left (d x +c \right )}{3}+3 a^{2} b \left (-\frac {\sin \left (d x +c \right )^{2}}{2}-\ln \left (\cos \left (d x +c \right )\right )\right )+3 a \,b^{2} \left (\frac {\sin \left (d x +c \right )^{4}}{\cos \left (d x +c \right )}+\left (2+\sin \left (d x +c \right )^{2}\right ) \cos \left (d x +c \right )\right )+b^{3} \left (\frac {\tan \left (d x +c \right )^{2}}{2}+\ln \left (\cos \left (d x +c \right )\right )\right )}{d}\) | \(116\) |
default | \(\frac {-\frac {a^{3} \left (2+\sin \left (d x +c \right )^{2}\right ) \cos \left (d x +c \right )}{3}+3 a^{2} b \left (-\frac {\sin \left (d x +c \right )^{2}}{2}-\ln \left (\cos \left (d x +c \right )\right )\right )+3 a \,b^{2} \left (\frac {\sin \left (d x +c \right )^{4}}{\cos \left (d x +c \right )}+\left (2+\sin \left (d x +c \right )^{2}\right ) \cos \left (d x +c \right )\right )+b^{3} \left (\frac {\tan \left (d x +c \right )^{2}}{2}+\ln \left (\cos \left (d x +c \right )\right )\right )}{d}\) | \(116\) |
parts | \(-\frac {a^{3} \left (2+\sin \left (d x +c \right )^{2}\right ) \cos \left (d x +c \right )}{3 d}+\frac {b^{3} \left (\frac {\tan \left (d x +c \right )^{2}}{2}-\frac {\ln \left (1+\tan \left (d x +c \right )^{2}\right )}{2}\right )}{d}+\frac {3 a \,b^{2} \left (\frac {\sin \left (d x +c \right )^{4}}{\cos \left (d x +c \right )}+\left (2+\sin \left (d x +c \right )^{2}\right ) \cos \left (d x +c \right )\right )}{d}+\frac {3 a^{2} b \left (-\frac {\sin \left (d x +c \right )^{2}}{2}-\ln \left (\cos \left (d x +c \right )\right )\right )}{d}\) | \(130\) |
risch | \(-i x \,b^{3}-\frac {2 i b^{3} c}{d}+\frac {a^{3} {\mathrm e}^{3 i \left (d x +c \right )}}{24 d}+\frac {3 b \,{\mathrm e}^{2 i \left (d x +c \right )} a^{2}}{8 d}-\frac {3 a^{3} {\mathrm e}^{i \left (d x +c \right )}}{8 d}+\frac {3 a \,{\mathrm e}^{i \left (d x +c \right )} b^{2}}{2 d}-\frac {3 a^{3} {\mathrm e}^{-i \left (d x +c \right )}}{8 d}+\frac {3 a \,{\mathrm e}^{-i \left (d x +c \right )} b^{2}}{2 d}+\frac {3 b \,{\mathrm e}^{-2 i \left (d x +c \right )} a^{2}}{8 d}+\frac {a^{3} {\mathrm e}^{-3 i \left (d x +c \right )}}{24 d}+3 i a^{2} b x +\frac {6 i b \,a^{2} c}{d}+\frac {2 b^{2} \left (3 a \,{\mathrm e}^{3 i \left (d x +c \right )}+b \,{\mathrm e}^{2 i \left (d x +c \right )}+3 a \,{\mathrm e}^{i \left (d x +c \right )}\right )}{d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{2}}-\frac {3 b \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right ) a^{2}}{d}+\frac {b^{3} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{d}\) | \(275\) |
1/d*(-1/3*a^3*(2+sin(d*x+c)^2)*cos(d*x+c)+3*a^2*b*(-1/2*sin(d*x+c)^2-ln(co s(d*x+c)))+3*a*b^2*(sin(d*x+c)^4/cos(d*x+c)+(2+sin(d*x+c)^2)*cos(d*x+c))+b ^3*(1/2*tan(d*x+c)^2+ln(cos(d*x+c))))
Time = 0.28 (sec) , antiderivative size = 123, normalized size of antiderivative = 1.06 \[ \int (a \sin (c+d x)+b \tan (c+d x))^3 \, dx=\frac {4 \, a^{3} \cos \left (d x + c\right )^{5} + 18 \, a^{2} b \cos \left (d x + c\right )^{4} - 9 \, a^{2} b \cos \left (d x + c\right )^{2} + 36 \, a b^{2} \cos \left (d x + c\right ) - 12 \, {\left (a^{3} - 3 \, a b^{2}\right )} \cos \left (d x + c\right )^{3} - 12 \, {\left (3 \, a^{2} b - b^{3}\right )} \cos \left (d x + c\right )^{2} \log \left (-\cos \left (d x + c\right )\right ) + 6 \, b^{3}}{12 \, d \cos \left (d x + c\right )^{2}} \]
1/12*(4*a^3*cos(d*x + c)^5 + 18*a^2*b*cos(d*x + c)^4 - 9*a^2*b*cos(d*x + c )^2 + 36*a*b^2*cos(d*x + c) - 12*(a^3 - 3*a*b^2)*cos(d*x + c)^3 - 12*(3*a^ 2*b - b^3)*cos(d*x + c)^2*log(-cos(d*x + c)) + 6*b^3)/(d*cos(d*x + c)^2)
\[ \int (a \sin (c+d x)+b \tan (c+d x))^3 \, dx=\int \left (a \sin {\left (c + d x \right )} + b \tan {\left (c + d x \right )}\right )^{3}\, dx \]
Time = 0.22 (sec) , antiderivative size = 113, normalized size of antiderivative = 0.97 \[ \int (a \sin (c+d x)+b \tan (c+d x))^3 \, dx=\frac {{\left (\cos \left (d x + c\right )^{3} - 3 \, \cos \left (d x + c\right )\right )} a^{3}}{3 \, d} - \frac {3 \, {\left (\sin \left (d x + c\right )^{2} + \log \left (\sin \left (d x + c\right )^{2} - 1\right )\right )} a^{2} b}{2 \, d} - \frac {b^{3} {\left (\frac {1}{\sin \left (d x + c\right )^{2} - 1} - \log \left (\sin \left (d x + c\right )^{2} - 1\right )\right )}}{2 \, d} + \frac {3 \, a b^{2} {\left (\frac {1}{\cos \left (d x + c\right )} + \cos \left (d x + c\right )\right )}}{d} \]
1/3*(cos(d*x + c)^3 - 3*cos(d*x + c))*a^3/d - 3/2*(sin(d*x + c)^2 + log(si n(d*x + c)^2 - 1))*a^2*b/d - 1/2*b^3*(1/(sin(d*x + c)^2 - 1) - log(sin(d*x + c)^2 - 1))/d + 3*a*b^2*(1/cos(d*x + c) + cos(d*x + c))/d
Exception generated. \[ \int (a \sin (c+d x)+b \tan (c+d x))^3 \, dx=\text {Exception raised: TypeError} \]
Exception raised: TypeError >> an error occurred running a Giac command:IN PUT:sage2:=int(sage0,sageVARx):;OUTPUT:Modgcd: no suitable evaluation poin tindex.cc index_m operator + Error: Bad Argument ValueDone
Time = 26.13 (sec) , antiderivative size = 219, normalized size of antiderivative = 1.89 \[ \int (a \sin (c+d x)+b \tan (c+d x))^3 \, dx=\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (-\frac {4\,a^3}{3}-6\,a^2\,b+12\,a\,b^2+2\,b^3\right )-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,\left (4\,a^3-6\,a^2\,b+12\,a\,b^2-6\,b^3\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,\left (\frac {20\,a^3}{3}+6\,a^2\,b-12\,a\,b^2+6\,b^3\right )+12\,a\,b^2-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8\,\left (6\,a^2\,b-2\,b^3\right )-\frac {4\,a^3}{3}}{d\,{\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-1\right )}^2\,{\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}^3}-\frac {2\,b^3\,\mathrm {atanh}\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\right )-6\,a^2\,b\,\mathrm {atanh}\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\right )}{d} \]
(tan(c/2 + (d*x)/2)^2*(12*a*b^2 - 6*a^2*b - (4*a^3)/3 + 2*b^3) - tan(c/2 + (d*x)/2)^6*(12*a*b^2 - 6*a^2*b + 4*a^3 - 6*b^3) + tan(c/2 + (d*x)/2)^4*(6 *a^2*b - 12*a*b^2 + (20*a^3)/3 + 6*b^3) + 12*a*b^2 - tan(c/2 + (d*x)/2)^8* (6*a^2*b - 2*b^3) - (4*a^3)/3)/(d*(tan(c/2 + (d*x)/2)^2 - 1)^2*(tan(c/2 + (d*x)/2)^2 + 1)^3) - (2*b^3*atanh(tan(c/2 + (d*x)/2)^2) - 6*a^2*b*atanh(ta n(c/2 + (d*x)/2)^2))/d